﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace FastApi.Attributes
{
    public interface IFastService
    {

#if NET8_0_OR_GREATER

        IEnumerable<object?> GetKeyedServices(Type serviceType, object? serviceKey);

        IEnumerable<T> GetKeyedServices<T>(object? serviceKey);

        object GetRequiredKeyedService(Type serviceType, object? serviceKey);

        T GetRequiredKeyedService<T>(object? serviceKey) where T : notnull;

        T? GetKeyedService<T>(object? serviceKey);

#endif
        object? GetService(Type serviceType);

        T? GetService<T>();

        IEnumerable<object?> GetServices(Type serviceType);

        IEnumerable<T> GetServices<T>();

        object GetRequiredService(Type serviceType);

        T GetRequiredService<T>();

        void Dispose();

        ValueTask DisposeAsync();

    }
}
